<template>
    <form ref="sonForm" >
      用户名：<input type="text" name="username" v-model="form.uname">
      <br>
      密码：<input type="password" name="password" v-model="form.password">
    </form>
   
</template>
 
<script>
export default {
  
  
  data() {
    return {
      form:{
      uname: '',
      password: '',
      }
    };
  },
 
  methods: {
    sonSubmit() {
      console.log(this.form.uname)
      console.log(this.form.password)
      this.form.password = ''
      this.form.uname = ''
    }
  }
};
</script>

<style scoped>
     
</style>